package com.szd.qiongyou20.home.presenter;

import android.content.Context;

import com.szd.qiongyou20.home.bean.HotSearchBean;
import com.szd.qiongyou20.home.modle.LoadData;
import com.szd.qiongyou20.home.modle.LoadHomeData;
import com.szd.qiongyou20.home.modle.LoadSearchData;
import com.szd.qiongyou20.home.view.SearchDataToView;

/**
 * Created by SZD on 2016/12/23.
 */

public class SearchPre {

    private LoadData mLoadData;
    private SearchDataToView mSearchDataToView;

    public SearchPre(SearchDataToView searchDataToView) {
        mSearchDataToView = searchDataToView;
        mLoadData = new LoadHomeData();
    }

    public void loadDataToView(Context context){
        mLoadData.Search(context, new LoadSearchData() {
            @Override
            public void loadDataSuccess(HotSearchBean hotSearchBean) {
                mSearchDataToView.dataToView(hotSearchBean);
            }

            @Override
            public void loadDataFaile(String string) {

            }
        });
    }
}
